package com.m.lib;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class StringByte {
    public static void main(String[] args) {
//        byte[] s= new byte[4];
//        s[0] = 0x30;
//        s[1] = 0x30;
//        s[2] = 0x31;
//        s[3] = 0x31;
//
//        String str = new String(s);
//        System.out.println(str);

//        String startZeroStr = String.format("%07d", Integer.valueOf(22));
//        System.out.println("前补零方法二：" + startZeroStr);


//        byte a = 3;
//        byte b = 0;
//
//        int maxVersionNum = a & 0xff;
//        int mimVersionNum = b & 0xff;
//
//        String startZeroStr = "";
//        if (mimVersionNum < 10) {
//            startZeroStr = String.format("%02d", Integer.valueOf(mimVersionNum));
//        } else {
//            startZeroStr = String.valueOf(mimVersionNum);
//        }
//
//        String value = maxVersionNum + "." + startZeroStr;
//        System.out.println(value);
//        System.out.println(Float.valueOf(value));

        int array1[] = new int[]{7, 4, 8, 1, 4, 1, 4};
        int array2[] = new int[array1.length];


//        int array3[] = new int[]{};


        int count = 0;
        int count2 = 0;
        int count3 = 0;

        while (count < array1.length) {
            if (array1[count] == 1) {
                count++;
                continue;
            } else {
                array2[count2++] = array1[count];
//                array3[count3++] = array1[count];
                count++;

            }
        }
        for (int i = 0; i < count2; i++) {
            System.out.println(array2[i]);
        }

        System.out.println(Arrays.toString(array2));


    }
}
